import { hasPermission } from '@/directives/permission'
export const FRIEND_LINK_COLUMNS = [
  {
    name: 'ID',
    key: 'id',
    width: 50,
    fixed: 'left'
  },
  {
    name: '友链名称',
    key: 'name',
    align: 'left',
    showOverflowTooltip: true
  },
  {
    name: '友链地址',
    key: 'link'
  },
  {
    name: '友链LOGO',
    key: 'logo',
    slot: 'logo',
    width: 180
  },
  {
    name: '创建时间',
    key: 'createTime'
  },
  {
    name: '更新时间',
    key: 'updateTime'
  },
  {
    name: '操作',
    key: 'operate',
    fixed: 'right',
    width: 180,
    slot: 'operate',
    hidden: !hasPermission(['friend-link-permission:btn:edit', 'friend-link-permission:btn:delete'])
  }
].filter(o => !o.hidden)
